import { Box } from "@chakra-ui/react";
import { memo, useMemo } from "react";

const RenderOutput = ({
    nodeId,
    flowOutputList
}:any) => {
    const copyOutputs = JSON.parse(JSON.stringify(flowOutputList));
    const RenderCommonOutputs = useMemo(()=>{
        const renderOutputs = copyOutputs;

        return (
            <>
                {renderOutputs.map((output:any) => {
                    return output.label ? (
                        <Box>
                        <Box>{output.label}</Box>
                        </Box>
                    ) : null
                })}
            </>
        )
    },[copyOutputs,nodeId])

    return <>
        {RenderCommonOutputs}
    </>
}

export default memo(RenderOutput)